# -*- coding: utf-8 -*-
"""
@Time: 2022/7/26 11:44
@Author: jins
@File: 13.py
@Introduction: 
"""
from multiprocessing import Pool
lis = [0, 10, 20, 30, 40]


def write_numbers_2_file(num):
    with open('test0726.txt', 'a+') as f:
        for content in range(num, num + 10):
            f.write(str(content) + '\n')


if __name__ == '__main__':
    write_numbers_2_file(1)
p = Pool(2)
for i in lis:
    p.apply(func=write_numbers_2_file, args=(i,))
